package com.zhou.consumer;

import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 *注册到 EurekaServer 中，通过 Http 协议访问已注册到生态圈中的微服务。
 *
 * @author zkb
 * @date 2018/12/05
 *
 */
@SpringBootApplication
@EnableEurekaClient
public class TestConsumerApplication {

	private static final org.slf4j.Logger logger = LoggerFactory.getLogger(TestConsumerApplication.class);



	@Bean
	public RestTemplate restTemplate(){
		return new RestTemplate();
	}

	public static void main(String[] args) {
		SpringApplication.run(TestConsumerApplication.class, args);
		logger.info("【【【【【【 Consumer微服务 】】】】】】已启动.");
	}
}




